package org.unei.multiprocessor.sharememory;

public class StampedValue<T> {
	public long stamp;
	public T value;
	
	public StampedValue(T init){
		stamp=0;
		value=init;
	}
	
	public StampedValue(long stamp,T value){
		this.stamp=stamp;
		this.value=value;
	}
	
	public static <T> StampedValue<T> max(StampedValue<T> x,StampedValue<T> y){
		if(x.stamp>y.stamp)
			return x;
		else
			return y;
	}
	
	public static StampedValue<Object> MIN_VALUE=new StampedValue<Object>(null);
}
